clang-fix-cmpxchg8-detection-on-i386
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Sat, 11 Mar 2017 04:48:17 +0000 (04:48 +0000)
committerRaspbian forward porter <root@raspbian.org>
Sat, 11 Mar 2017 04:48:17 +0000 (04:48 +0000)
commit326e1ad62c2297e95d45d7f9f329740ed5c411e0
treedebb407a90e28b6dda247cb7e73daaa2831eb98c
parent863d3b127b8d8cce5e3b09acb48837dab1866a84
clang-fix-cmpxchg8-detection-on-i386

libcxx atomic tests for old i386 fail with wrong Atomic inline width.
cmpxchg8b instruction is required for 8 byte atomics that clang was
assuming.

Too bad _GCC_ATOMIC_LLONG_LOCK_FREE 2 isn't supported even with this change
because llvm doesn't support unaligned atomic compare and exchange operation.
Fallback calls to libatomic.so should handle long long lock free but clang
can't tell program if libatomic is always lock free.

Related bug: https://llvm.org/bugs/show_bug.cgi?id=19355

Gbp-Pq: Name clang-fix-cmpxchg8-detection-on-i386.patch
clang/lib/Basic/Targets.cpp
clang/test/Sema/atomic-ops.c